package day09;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * 输出流：WriterStream
 * 字节输出
 * 字符输出
 */
public class StreamWriter {

    public static void main(String[] args) {
        writerFile();
    }

    protected static void writerFile() {

        File file = new File("src/test11/hello_copy.txt");
        FileWriter fileWriter = null;
        try {
            fileWriter = new FileWriter(file);
            fileWriter.write("wo艹le\n");
            fileWriter.write("😂戏子");

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fileWriter != null) {
                try {
                    fileWriter.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }


    }

}
